package com.ledim.share.ex;

import android.content.Intent;

public abstract class BSsoHandler {

    /**
     * 进行sso认证
     *
     * @param activity
     *         发起认证的Activity
     * @param listener
     *         用于接收认证信息的监听者
     */
    public abstract void authorize(final WeiboAuthListener listener);

    /**
     * 重要:发起认证的Activity必须重写onActivityResult， 这个方法必须在onActivityResult 方法内调用，
     * 例如：<br/>
     *
     * @Override protected void onActivityResult(int requestCode, int resultCode, Intent data)
     * {<br/>
     * super.onActivityResult(requestCode, resultCode, data);<br/>
     * if(mSsoHandler!=null){<br/>
     * mSsoHandler.authorizeCallBack(requestCode, resultCode, data);<br/>
     * }<br/>
     * }
     */
    public abstract void authorizeCallBack(int requestCode, int resultCode, Intent data);
}
